<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
session_start();
require_once ('funciones.php');

conectar('localhost', 'root', 'root', 'bd');

$user = strip_tags($_POST['user']);
$pass = strip_tags($_POST['pass']);

$query = @mysql_query('SELECT * FROM nombrebase WHERE user = "'.$user.'" AND pass = "'.$pass.'"');

if($existe = @mysql_fetch_object($query)){
    $_SESSION['logged'] = 'yes' ;
    $_SESSION['user'] = $user ;
    echo '<scrip>window.location = "logeado.php"</scrip>';
    
}else{
    
    echo 'el usuario o pass incorrectos';
}
?>
